require(["core", "jQuery", "coAjax", "queryString", "href", "hash_routie"], function(jSouper, $, coAjax, QueryString, href, hash_routie) {
	hash_routie.on("assshop", function() {
		coAjax.get(appConfig.bus.assshop_list, function(result) {
			App.set("$Cache.bus.assshop.list", result.result);
		});
	});
	App.set("$Event.bus.assshop.add_assshop", function() {
		coAjax.post(appConfig.bus.add_assshop, {
			vcode: App.get("$Cache.bus.assshop.vcode")
		}, function(result) {
			alert("success", "成功添加店铺关联");
			App.set("$Cache.bus.assshop.list", result.result);
		});
	});
	App.set("$Event.bus.assshop.remove_assshop", function(e, vm) {
		coAjax["delete"](appConfig.bus.remove_assshop + vm.get("bus._id"), function(result) {
			alert("success", "成功移除店铺关联");
			App.set("$Cache.bus.assshop.list", result.result);
		});
	});
	App.set("$Event.bus.assshop.require_assshop", function(e, vm) {
		coAjax.post(appConfig.bus.require_assshop, {
			phone: App.get("$Cache.bus.assshop.phone")
		}, function(result) {
			alert("success", result.result);
		});
	});
});